-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete MediaRanker #42
base: dfp/master
Are you sure you want to change the base?
Conversation
…ute pointing to media#index, add a view for media#index
end | ||
|
||
def upvote | ||
album = Album.find(params[:id]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you search for this album in multiple methods. A possible way you could DRY up your code in a refactor would be to extract finding the album into its own private method and create a before_action
that calls it before each method except: [:index, :new, :create]
.
Great work on this project @desireepoland ! You definitely know about Ruby CRUD-ing. Your code is very clean and easy to read. I especially like that you leveraged partials to DRY up your code. You are picking up great habits early on! This project is also a great place to practice rspec testing so I would highly recommend completing your tests here if you come back to refactor this. You are on the right track and have a lot of good groundwork commented out. Also, it is not required, but you could consider removing extraneous .coffee and .scss files that you are not using as a way to clean out your application directory. |
Complete MediaRanker functionality, with Bootstrap styling and rspec. Also DRYed up code using partials and rspec shared examples.